<template>
  <div>
    <h1>App</h1>
    <ul>
      <li>
        <RouterLink to="/home/index">Home</RouterLink>
      </li>
      <li>
        <RouterLink to="/shop/index">Shop</RouterLink>
      </li>
      <li>
        <RouterLink to="/cart/index">Cart</RouterLink>
      </li>
      <li>
        <RouterLink to="/userindex">User</RouterLink>
      </li>
    </ul>
    {{infoStore.count}} <button @click="infoStore.count++">infoStore.count++</button>
    <hr>
    {{shopStore.title}}
    <RouterView></RouterView>
  </div>
</template>
<script setup>

import { useInfoStore,useShopStore } from '@/store'

// 获取状态对象
const infoStore =  useInfoStore();
const shopStore =  useShopStore();

console.log(infoStore.count);
console.log(infoStore.title);
console.log(infoStore.g1);
infoStore.say();

// ----

console.log(shopStore);



</script>

<style>
div {
  border: solid;
  padding: 10px;
}
</style>